		<ul>
		
		<?php foreach ( $albums as $alb ) { ?>
			
			<?php if ( $alb['photoCount']>0 ) { ?>
			
			<li>
			
				<a href="<?= $alb['path'].'/' ?>" title="<?= $alb['name'] ?>">
					<img src="<?= "/Thumbs/${alb[pid]}-small.${alb[type]}" ?>" alt="<?= $alb['name'] ?>" />
				</a>
				
				<a href="<?= $alb['path'].'/' ?>" class="album-name"><?= $alb['name'] ?></a>
				
				<div class="album-subtitle"><?= fill( getTerm('albums', 'photo_count'), $alb['photoCount'] ) ?></div>
				
				<?php if ($hasWritePermission) { ?>
				<div class="albumControls">
					<a href="#" onCLick="showRenameAlbumForm(<?= $alb['aid'] ?>);return false;"><?= getTerm('albums', 'rename') ?></a>
					|
					<a href="/Scripts/AlbumController.php?ac=deleteAlbum&id=<?= $alb['aid'] ?>" onCLick="return confirm('<?= fill( getTerm('albums', 'confirm_delete') , $alb['name'] , $alb['photoCount'] ) ?>')"><?= getTerm('albums', 'delete') ?></a>
				</div>
				<?php } ?>
				
			</li>
			
			<?php } else { ?>
			
			<li>
				<a href="<?= $alb['path'].'/' ?>" class="album-name"><?= $alb['name'] ?></a>
				<div class="album-subtitle"><?= getTerm('albums', 'empty_album') ?></div>
				
				<?php if ($hasWritePermission) { ?>
				<div class="albumControls">
					<a href="/Scripts/AlbumController.php?ac=deleteAlbum&id=<?= $alb['aid'] ?>" onCLick="return confirm('<?= fill( getTerm('albums', 'confirm_delete') , $alb['name'] , $alb['photoCount'] ) ?>')"><?= getTerm('albums', 'rename') ?></a>
					|
					<a href="/Scripts/AlbumController.php?ac=deleteAlbum&id=<?= $alb['aid'] ?>" onCLick="return confirm('<?= fill( getTerm('albums', 'confirm_delete') , $alb['name'] , $alb['photoCount'] ) ?>')"><?= getTerm('albums', 'delete') ?></a>
				</div>
				<?php } ?>				
				
			</li>
			
			<?php } ?>
			
		<?php } ?>
		
		</ul>